import { ApiProperty } from '@nestjs/swagger';
import { IsEnum, IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator';
import { WorkspaceMemberRole } from '../../../types/enums';

export class CreateWorkspaceMemberDto {
  @ApiProperty({
    description: '用户ID',
    example: '550e8400-e29b-41d4-a716-446655440000'
  })
  @IsNotEmpty()
  @IsUUID()
  userId: string;

  @ApiProperty({
    description: '工作区成员角色',
    enum: WorkspaceMemberRole,
    default: WorkspaceMemberRole.MEMBER,
    example: WorkspaceMemberRole.MEMBER
  })
  @IsOptional()
  @IsEnum(WorkspaceMemberRole)
  role?: WorkspaceMemberRole;
} 